package metamodels;

import java.util.ArrayList;
import java.util.List;

public class Attribute extends Feature {

	private Identifier field;
	private Identifier type;

	public Attribute(Identifier identifier, Identifier identifier2) {
		this.field = identifier;
		this.type = identifier2;
	}

	@Override
	public String toString() {
		return "attribute " + field + " : " + type + ";";
	}

	@Override
	public List<? extends String> getIdentifiers() {
		List<String> list = new ArrayList<String>();
		list.add(field.toString());
		list.add(type.toString());
		return list;
	}

	@Override
	public List<? extends Identifier> getIdentifiers_() {
		List<Identifier> list = new ArrayList<Identifier>();
		list.add(field);
		list.add(type);
		return list;
	}
	
	@Override
	public String getMapping() {
		return "(" + field.toString() + " |-> " + type.toString() + ")";
	}
}
